import { getDetailInfo } from "../../utils/api";

export default {
  namespaced: true,
  state() {
    return {
      detailInfo: null,
    }
  },
  mutations: {
    getDetail(state, { result }) {
      state.detailInfo = result;
      console.log(state.detailInfo);
    }
  },
  actions: {
    async getDetail({ commit }, id) {
      const res = await getDetailInfo({ id: id });
      commit("getDetail", res);
    }
  },
}